<div class="row">
  <div class="col-xs-12">
    <div class="box">
      <div class="box-body">
        <form class="form-inline">
          <div class="box box-default">
            <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding-left:0px;margin-bottom:8px !important;">
              <button type="button" *ngIf="_.includes(menuResourceSet,'btn-productInfo-stopfund-entry')" class="btn btn-primary" (click)="showInput()">
                <i class="fa fa-edit"></i>手工录入</button>
              <button type="button" *ngIf="_.includes(menuResourceSet,'btn-productInfo-stopfund-edit')" class="btn btn-primary" (click)="showEdit()">
                <i class="fa fa-edit"></i>修改</button>
              <button type="button" *ngIf="_.includes(menuResourceSet,'btn-productInfo-stopfund-delete')" class="btn btn-primary" (click)="del()">
                <i class="iconfont icon-iconzhenghe62"></i>删除</button>
              <button type="button" *ngIf="_.includes(menuResourceSet,'btn-productInfo-stopfund-export')" class="btn btn-primary" (click)="exportExcel()">
                <i class="fa fa-sign-out"></i>导出Excel</button>
              <button type="button" class="btn btn-box-tool pull-right" data-widget="collapse">
                <i class="fa fa-minus"></i>
              </button>
            </div>
            <div class="box-body" style="display:block">
              <div class="form-group col-lg-12" style="margin-bottom:10px !important;padding-left:0px !important;">
                <label>产品代码：</label>
                <input class="form-control" [(ngModel)]="getBody.sFundCode" name="sFundCode" placeholder="产品代码">
                <label class=" control-label">开始日期：</label>
                <div class="input-group date form_datetime">
                  <span class="input-group-addon">
                    <i class="fa fa-calendar"></i>
                  </span>
                  <input type="text" class="form-control" style="background: white; cursor: pointer;" mwlFlatpickr [ngModelOptions]="{standalone: false}"
                    [(ngModel)]="getBody.sBegin" name="sBegin">
                </div>
                <button type="button" class="btn btn-primary" (click)="list(1)">
                  <i class="fa fa-search"></i>查询</button>
              </div>
              <div class="form-group col-lg-12" style="padding-left:0px !important;">
                <label>产品名称：</label>
                <input class="form-control" [(ngModel)]="getBody.sFundName" name="sFundName" placeholder="产品名称">
                <label class=" control-label">结束日期：</label>
                <div class="input-group date form_datetime">
                  <span class="input-group-addon">
                    <i class="fa fa-calendar"></i>
                  </span>
                  <input type="text" class="form-control" style="background: white; cursor: pointer;" mwlFlatpickr [ngModelOptions]="{standalone: false}"
                    [(ngModel)]="getBody.sEnd" name="sEnd">
                </div>
                <label>是否完结：</label>
                <select class="form-control" [(ngModel)]="getBody.logStatus" name="logStatus">
                  <option [value]="''">全部</option>
                  <option [value]="'已完结'">已完结</option>
                  <option [value]="'未完结'">未完结</option>
                </select>
              </div>
            </div>
          </div>
        </form>

        <div class="box-body" style="padding-left:0px;padding-right:0px;">
          <div style="overflow-x:scroll;width:100%">
            <table id="fixed-table" class="table table-bordered table-hover table-keep-line table-striped">
              <thead>
                <tr>
                  <th class="width-4">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" name="checkboxAll" [(ngModel)]="isCheckedAll" (ngModelChange)="checkedAll()">
                      <label></label>
                    </div>
                  </th>
                  <th class="width-12" (click)="orderData('sFundCode')">产品代码<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('sFundName')">产品简称<i class="fa fa-sort"></i></th>
                  <!-- <th class="width-12">产品类型</th> -->
                  <th class="width-12" (click)="orderData('logDate')">日期<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('logMemo')">摘要<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('logDebetAmount')">资金流入<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('logCreditAmount')">资金流出<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('logBalance')">余额<i class="fa fa-sort"></i></th>
                  <th class="width-12" (click)="orderData('logStatus')">是否完结<i class="fa fa-sort"></i></th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let item of dataList">
                  <td class="width-4">
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" name="checkbox1" [(ngModel)]="item.isChecked" (ngModelChange)="ctrlCheckAll()">
                      <label></label>
                    </div>
                  </td>
                  <td class="width-12 short_name" [attr.title]="item.sFundCode">{{item.sFundCode}}</td>
                  <td class="width-12 short_name" [attr.title]="item.sFundName">{{item.sFundName}}</td>
                  <!-- <td class="short_name" [attr.title]="item.sFundType">{{item.sFundType}}</td> -->
                  <td class="width-12 short_name" [attr.title]="item.logDate">{{item.logDate}}</td>
                  <td class="width-12 short_name" [attr.title]="item.logMemo">{{item.logMemo}}</td>
                  <td class="width-12 short_name" [attr.title]="item.logDebetAmount">{{item.logDebetAmount}}</td>
                  <td class="width-12 short_name" [attr.title]="item.logCreditAmount">{{item.logCreditAmount}}</td>
                  <td class="width-12 short_name" [attr.title]="item.logBalance">{{item.logBalance}}</td>
                  <td class="width-12 short_name" [attr.title]="item.logStatus">{{item.logStatus}}</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>

        <div class="box-footer clearfix">
          <app-pagination [currentPageNum]="listPageInfo.currentPageNum" [pagesShow]="" [totalPages]="listPageInfo.totalPages" (pageChanged)="listPageNavigation($event)">
            <div class="pull-left pagination-detail" data-pagination-additional="true">
              <span class="pagination-info">
                当前显示第{{listPageInfo.startRow}}到第{{listPageInfo.endRow}}条，总共{{listPageInfo.total}}条，
              </span>
              <span class="page-list">每页记录
                <span class="btn-group dropup">
                  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                    <span class="page-size">{{listPageInfo.pageSize}}</span>
                    <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu" role="menu">
                    <li *ngFor="let i of listPageInfo.pageList" role="menuitem" [class.active]="listPageInfo.pageSize===i" (click)="listPageSizeChange(i)">
                      <a>{{i}}</a>
                    </li>
                  </ul>
                </span>条
              </span>
            </div>
          </app-pagination>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 手工录入modal -->
<div class="modal modal-detail" id="input">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">终止后资金流水-手工录入</h4>
      </div>
      <div class="modal-body">
        <form class="form-inline">
          <div class="form-group" style="margin-left:10px;">
            <label class="control-label">产品账户：</label>
            <select class="form-control account" [(ngModel)]="accountId" name="accountId">
              <option [value]="item.nFundNo" *ngFor="let item of accountList">{{item.sFundName}}</option>
            </select>
          </div>
        </form>
        <div class="box-body" style="padding-left:0px;padding-right:0px;">
          <div style="overflow-x:scroll;width:100%">
            <table class="table table-bordered table-hover table-keep-line">
              <thead>
                <tr>
                  <th class="width-8">作废标签</th>
                  <th class="width-20">日期</th>
                  <th class="width-20">摘要</th>
                  <th class="width-20">资金流入</th>
                  <th class="width-20">资金流出</th>
                  <th class="width-12">是否完结</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let item of inputList;let i =index">
                  <td>
                    <div class="checkbox checkbox-primary">
                      <input type="checkbox" name="inputCheckbox" [(ngModel)]="item.isChecked">
                      <label></label>
                    </div>
                  </td>
                  <td>
                    <input type="text" class="input-width" style="background: white; cursor: pointer;" mwlFlatpickr [ngModelOptions]="{standalone: false}"
                      [(ngModel)]="item.logDate" name="logDate">
                  </td>
                  <td>
                    <input type="text" class="input-width" [(ngModel)]="item.logMemo" name="logMemo">
                  </td>
                  <td>
                    <input type="number" class="input-width" [(ngModel)]="item.logDebetAmount" name="logDebetAmount" (blur)="filterNumber(i,'logDebetAmount',item.logDebetAmount,'手工录入')">
                  </td>
                  <td>
                    <input type="number" class="input-width" [(ngModel)]="item.logCreditAmount" name="logCreditAmount" (blur)="filterNumber(i,'logCreditAmount',item.logCreditAmount,'手工录入')">
                  </td>
                  <td>
                    <select class="input-width" [(ngModel)]="item.logStatus" name="logStatus">
                      <option [value]="'已完结'">已完结</option>
                      <option [value]="'未完结'">未完结</option>
                    </select>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
        <button class="btn btn-primary pull-right" (click)="saveInput()">
          <i class="fa fa-save"></i>保存</button>
      </div>
    </div>
  </div>
</div>

<!-- 修改modal -->
<div class="modal modal-detail" id="edit">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">修改</h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" style="padding-top:20px">
          <div class="form-group">
            <label class="col-lg-2 text-right">产品代码：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="editBody.sFundCode" name="sFundCode" disabled>
            </div>
            <label class="col-lg-2 text-right">产品名称：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="editBody.sFundName" name="sFundName" disabled>
            </div>
          </div>

          <div class="form-group" style="margin-top:20px">
            <label class="col-lg-2 text-right">
              <span class="span-style">*</span>日期：</label>
            <div class="col-lg-3">
              <div class="input-group date form_datetime">
                <span class="input-group-addon">
                  <i class="fa fa-calendar"></i>
                </span>
                <input type="text" class="form-control" style="background: white; cursor: pointer;" mwlFlatpickr [ngModelOptions]="{standalone: false}"
                  [(ngModel)]="editBody.logDate" name="logDate">
              </div>
            </div>
            <label class="col-lg-2 text-right">
              <span class="span-style">*</span>摘要：</label>
            <div class="col-lg-3">
              <input class="form-control" type="text" [(ngModel)]="editBody.logMemo" name="logMemo">
            </div>
          </div>

          <div class="form-group" style="margin-top:20px">
            <label class="col-lg-2 text-right">资金流入：</label>
            <div class="col-lg-3">
              <input class="form-control" type="number" [(ngModel)]="editBody.logDebetAmount" (blur)="filterNumber(1,'logDebetAmount',editBody.logDebetAmount,'修改')"
                name="logDebetAmount">
            </div>
            <label class="col-lg-2 text-right">资金流出：</label>
            <div class="col-lg-3">
              <input class="form-control" type="number" [(ngModel)]="editBody.logCreditAmount" (blur)="filterNumber(1,'logCreditAmount',editBody.logCreditAmount,'修改')"
                name="logCreditAmount">
            </div>
          </div>

          <div class="form-group" style="margin-top:20px">
            <label class="col-lg-2 text-right">是否完结：</label>
            <div class="col-lg-3">
              <select class="form-control" [(ngModel)]="editBody.logStatus" name="logStatus">
                <option [value]="'已完结'">已完结</option>
                <option [value]="'未完结'">未完结</option>
              </select>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
        <button class="btn btn-primary pull-right" (click)="saveEdit()">
          <i class="fa fa-save"></i>保存</button>
      </div>
    </div>
  </div>
</div>